import java.util.Random;
import java.util.Scanner;

public class exam {
    public static void main(String[] args) {
        Random random = new Random();
        Scanner sc = new Scanner(System.in);
        int value = random.nextInt(100) + 1;

        while (true) {
            System.out.print("请输入你的数字：");
            int scValue = sc.nextInt();
            if (scValue < value) {
                System.out.println("猜小了");
            } else if (scValue > value) {
                System.out.println("猜大了");
            } else {
                System.out.println("猜对了");
                break;
            }
        }
    }
}
